package com.imooc.mall.service;

import com.imooc.mall.common.ResultInfo;
import com.imooc.mall.dto.CartDto;
import com.imooc.mall.dto.CartUpdateDto;
import com.imooc.mall.form.CartAddForm;
import com.imooc.mall.pojo.CartForRedis;

import java.util.List;

public interface ICartService {


    ResultInfo<CartDto> add(CartAddForm cartAddForm, Integer uid);

    ResultInfo<CartDto> list(Integer uid);

    ResultInfo<CartDto> update(Integer uid, Integer productId, CartUpdateDto cartUpdateDto);

    ResultInfo<CartDto> delete(Integer uid, Integer productId);

    ResultInfo<CartDto> selectAll(Integer uid);

    ResultInfo<CartDto> unSelectAll(Integer uid);

    ResultInfo<Integer> sum(Integer uid);

    List<CartForRedis> getCartListFromRedis(Integer uid);


}
